/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.jfonia.view.symbols;

import org.jfonia.assets.fonts.Fughetta;
import org.jfonia.connect5.basics.MutableValueNode;
import org.jfonia.connect5.basics.ValueNode;
import org.jfonia.constants.SymbolConstants;

/**
 *
 * @author Rik Bauwens
 */
public class DigitSymbol extends PrimitiveStaffSymbol
{
    
        private int digit;

        public DigitSymbol(ValueNode<Double> frameX, ValueNode<Double> staffY,
                           MutableValueNode<Double> staffBase, MutableValueNode<Double> postStaffBase,
                           ValueNode<Double> xNode, MutableValueNode<Double> widthNode,
                           MutableValueNode<Integer> rankNode, int digit)
        {
                super(frameX, staffY, staffBase, postStaffBase, xNode, widthNode, rankNode);
                this.digit = digit;
                init();
        }

        private void init()
        {
                textGlyph = Fughetta.getGlyph(SymbolConstants.DIGIT + digit);
                textGlyph.setSize(SymbolConstants.SYMBOL_SIZE);
                updateNodes();
        }

}
